<template>
  <div class="Myheader">
    <!-- 左侧返回 -->
    <div @click="$router.go(-1)" v-if="isLeft" class="back">
      <span><i class="iconfont icon-fanhui"></i>返回</span>
    </div>

    <div class="title" :class="isLeft ? 'left':'center'">{{title}}</div>
    <!-- 中间标题 -->
  </div>
</template>
<script>
export default {
  props: {
    title: String,
    isLeft: {
      type: Boolean,
      default: false
    }
  },
  name: 'Myheader',
  data () {
    return {
    }
  },
  created () {
  },
  computed: {
  },
  methods: {
  },
}
</script>
<style  scoped>
.Myheader {
  height: 1.2rem;
  background-color: #0593ed;
  display: flex;
  align-items: center;
  padding: 0 0.3rem;
  color: #fff;
}
.title {
  flex: 2;
}
.Myheader i {
  margin-right: 0.1rem;
}
.back {
  flex: 1;
}
.center {
  text-align: center !important;
}
.left {
  margin-left: .9rem;
}
</style>
